/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package logging;

import org.apache.log4j.Logger;
import org.apache.log4j.spi.Configurator;
import org.apache.log4j.xml.DOMConfigurator;

/**
 *
 * @author Shuhail
 */
public class CommonsLogging {
    
    public static CommonsLogging getInstance() {
        
        return new CommonsLogging();
    }
    public Logger getLogger() {
        DOMConfigurator.configure("src\\log4j.xml");
        Logger logger = Logger.getLogger("royallog");
         return logger;
    }
    
    public static void main(String[] args) {
        
        Logger log = new CommonsLogging().getLogger();
        log.info("SAmple Tes12t");
        log.error("Error12");
        log.debug("Test De12bug");
        
    }
    
}
